<template>
  <!-- 小说章节内容页面 -->
  <div class="infoContent">
    <span @click="this.$router.go(-1)" class="back">返回上一页</span>
    <ul>
      <li v-for="(info,index) in infoList" :key="index">
        {{info}}
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'NovelInfo',
  data () {
    return {
      infoList: ''
    }
  },
  methods: {
    getInfo () {
      this.$http.request({
        url: 'https://api.pingcc.cn/fictionContent/search/' + this.$route.query.chapterId,
        method: 'get'
      })
        .then((res) => {
          // console.log(res.data.data)
          this.infoList = res.data.data
        })
        .catch((err) => {
          console.log(err)
        })
    }
  },
  mounted () {
    this.getInfo()
  }
}
</script>

<style scoped>
.infoContent{
  width: 1200px;
  margin: 0 auto;
  background-color: #d2b663;
  padding: 40px 60px;
}
/*ul>li:nth-child(1) {*/
/*  font-size: 25px;*/
/*  text-align: center;*/
/*  margin-bottom: 50px;*/
/*}*/
ul>li{
  margin: 15px 0;
  font-size: 20px;
}
.back{
  display: inline-block;
  font-size: 20px;
  cursor: pointer;
  margin: 10px 5px 20px;
}
.back:hover{
  color: #FFFFFF;
}
</style>
